package com.symria.client.common;

import java.util.Date;

import com.symria.framework.page.ATTPage;
import com.symria.framework.page.Page;
import com.symria.framework.page.PagerFactory;
import com.symria.framework.util.BaseAction;
import com.symria.server.bo.common.FinanceService;
import com.symria.server.po.AppDateReport;
import com.symria.server.po.UserInfo;

public class FinanceAction extends BaseAction {

	public FinanceService financeService;
	private Date beginDate,endDate;
	private AppDateReport aar;
	private UserInfo user;
	private Integer[] ids;
	private String state;
	
	public String searchAppDateReport(){
		Page page = PagerFactory.createPage();
		financeService.searchAppDateReport(aar, beginDate, endDate, page);
		setAttr(ATTPage.PAGE_LIST, page);
		return SUCCESS;
	}
	public String comfirmAppDateReport(){
	    if(ids!=null){
	    	financeService.updateAppDateReport(ids);
	    }
		return SUCCESS;
	}
	public String searchUserAccount(){
		Page page = PagerFactory.createPage();
		System.out.println(financeService==null);
		
		financeService.searchUserAccount(user, beginDate, endDate, page);
		setAttr(ATTPage.PAGE_LIST, page);
		return SUCCESS;
	}
	public String searchPayInfo(){
		Page page = PagerFactory.createPage();
		financeService.searchPayInfo(user, beginDate, endDate,state, page);
		setAttr(ATTPage.PAGE_LIST, page);
	    return SUCCESS;
	}
	public String comfirmPayInfo(){
		if(ids!=null){
	    	financeService.updatePayInfo(ids);
	    }
		return SUCCESS;
	}
	
	public FinanceService getFinanceService() {
		return financeService;
	}

	public void setFinanceService(FinanceService financeService) {
		this.financeService = financeService;
	}

	public Date getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public AppDateReport getAar() {
		return aar;
	}

	public void setAar(AppDateReport aar) {
		this.aar = aar;
	}
	public Integer[] getIds() {
		return ids;
	}
	public void setIds(Integer[] ids) {
		this.ids = ids;
	}
	public UserInfo getUser() {
		return user;
	}
	public void setUser(UserInfo user) {
		this.user = user;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	
	
}
